using System.Runtime.CompilerServices;
using UnityEngine;

public class EventManager : MonoBehaviour
{
	public delegate void TestEventHandler(string testValue1, string testValue2);

	public delegate void OneTouchEventHandler(Vector3 touchPosition);

	public delegate void TwoTouchEventHandler(Vector3 touchPosition, float touchDistance);

	public delegate void GameFreezeStateEventHandler();

	public delegate void GlobalEventsHandler();

	[method: MethodImpl(32)]
	public static event TestEventHandler OnTestEvent;

	[method: MethodImpl(32)]
	public static event OneTouchEventHandler OneTouchBeginEvent;

	[method: MethodImpl(32)]
	public static event OneTouchEventHandler OneTouchMoveEvent;

	[method: MethodImpl(32)]
	public static event OneTouchEventHandler OneTouchEndEvent;

	[method: MethodImpl(32)]
	public static event TwoTouchEventHandler TwoTouchBeginEvent;

	[method: MethodImpl(32)]
	public static event TwoTouchEventHandler TwoTouchMoveEvent;

	[method: MethodImpl(32)]
	public static event TwoTouchEventHandler TwoTouchEndEvent;

	[method: MethodImpl(32)]
	public static event GameFreezeStateEventHandler GameFreezeEvent;

	[method: MethodImpl(32)]
	public static event GameFreezeStateEventHandler GameUnfreezeEvent;

	[method: MethodImpl(32)]
	public static event GlobalEventsHandler WorldResetEvent;

	[method: MethodImpl(32)]
	public static event GlobalEventsHandler AfterWorldResetEvent;

	public static void FireTestEvent(string testValue1, string testValue2)
	{
		if (EventManager.OnTestEvent != null)
		{
			EventManager.OnTestEvent(testValue1, testValue2);
		}
		else
		{
			Debug.Log("nu este nimeni care sa raspunda la acest event");
		}
	}

	public static void FireOneTouchBegin(Vector3 touchPosition)
	{
		if (EventManager.OneTouchBeginEvent != null)
		{
			EventManager.OneTouchBeginEvent(touchPosition);
		}
	}

	public static void FireOneTouchMove(Vector3 touchPosition)
	{
		if (EventManager.OneTouchMoveEvent != null)
		{
			EventManager.OneTouchMoveEvent(touchPosition);
		}
	}

	public static void FireOneTouchEnd(Vector3 touchPosition)
	{
		if (EventManager.OneTouchEndEvent != null)
		{
			EventManager.OneTouchEndEvent(touchPosition);
		}
	}

	public static void FireTwoTouchBegin(Vector3 touchPosition, float touchDistance)
	{
		if (EventManager.TwoTouchBeginEvent != null)
		{
			EventManager.TwoTouchBeginEvent(touchPosition, touchDistance);
		}
	}

	public static void FireTwoTouchMove(Vector3 touchPosition, float touchDistance)
	{
		if (EventManager.TwoTouchMoveEvent != null)
		{
			EventManager.TwoTouchMoveEvent(touchPosition, touchDistance);
		}
	}

	public static void FireTwoTouchEnd(Vector3 touchPosition, float touchDistance)
	{
		if (EventManager.TwoTouchEndEvent != null)
		{
			EventManager.TwoTouchEndEvent(touchPosition, touchDistance);
		}
	}

	public static void GameFreeze()
	{
		if (EventManager.GameFreezeEvent != null)
		{
			EventManager.GameFreezeEvent();
		}
	}

	public static void GameUnfreeze()
	{
		if (EventManager.GameUnfreezeEvent != null)
		{
			EventManager.GameUnfreezeEvent();
		}
	}

	public static void WorldReset()
	{
		if (EventManager.WorldResetEvent != null)
		{
			EventManager.WorldResetEvent();
		}
	}

	public static void AfterWorldReset()
	{
		if (EventManager.AfterWorldResetEvent != null)
		{
			EventManager.AfterWorldResetEvent();
		}
	}
}
